<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;

//登录接口路由修改
Route::rule("api/teacherLogin","index/login/teacherLogin");
Route::rule("api/studentLogin","index/login/studentLogin");

//修改密码接口路由修改
Route::rule("api/modifyTeacherPwd","index/modify/modifyTeacherPwd");
Route::rule("api/modifyStudentPwd","index/modify/modifyStudentPwd");

//选课，录入成绩接口路由修改
Route::rule("api/chooseCourse","index/add/chooseCourse");
Route::rule("api/addScore","index/add/addScore");

//各种查询接口
Route::rule("api/getTeacher","index/select/getTeacher");
Route::rule("api/getStudent","index/select/getStudent");
Route::rule("api/getAllCourse","index/select/getAllCourse");
Route::rule("api/getTeacherCourse","index/select/getTeacherCourse");
Route::rule("api/getCourseStudent","index/select/getCourseStudent");
Route::rule("api/getStudentCourse","index/select/getStudentCourse");
Route::rule("api/getScore","index/select/getScore");


return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
